package jiangwj.controller;

import com.alibaba.fastjson.JSONArray;
import com.google.gson.JsonArray;
import jiangwj.pojo.JWJPojo;
import jiangwj.service.JWJService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

//注释！！
@Controller
@RequestMapping("/hello")
public class JWJController {
    @Autowired
    JWJService jwjService;
    @ResponseBody
    public String hello(){
        List<JWJPojo> list=jwjService.hello();
        return JSONArray.toJSONString(list);
    };
}
